package com.chixing.day03_oop;

/**
 * 该类表达的是：公司类
 * 封装了 所有公司的共有属性和方法
 *
 * 访问修饰符
 * 属性用public 修饰 存在的问题：
 *   （1）若修改属性名，会出现其他很多地方要修改，可维护性很差
 *   （2）元信息（meta）被暴露出来了，安全性低
 *
 *
 *   解决方案：
 *   public--->private
 *   public：由public修饰的属性与方法，其他类都能直接访问
 *   private：由private修饰的属性与方法，只能本类访内部访问
 */
public class Company {
    private int companyId;
    private String companyName;
    private String companyType;
    private String companyAddress;
    private long companyTelno;


    //getters &setters
    //属性赋值
    public void setCompanyId(int id){
        this.companyId=id;
    }
    //属性取值
    public int getCompanyId(){
        return this.companyId;
    }

    public void setCompanyName(String name) {
        this.companyName = name;
    }

    public String getCompanyName(){
        return this.companyName;
    }

    public void setCompanyAddress(String address) {
        this.companyAddress = address;
    }

    public String getCompanyAddress(){
        return this.companyAddress;
    }

    public void setCompanyType(String type) {
        this.companyType = type;
    }

    public String getCompanyType(){
        return this.companyType;
    }

    public void setCompanyTelno(long telno) {
        this.companyTelno = telno;
    }

    public long getCompanyTelno(){
        return this.companyTelno;
    }

    //方法

    //发布一个新岗位
    public void publishJob(){

    }
    //查看简历
    public void getResume(){

    }

}
